<?php

function scan($dir)
{
    static $i = 1;
    if (is_dir($dir)) {
        $files = scandir($dir);
        foreach ($files as $file) {
            if ($file !== '.' && $file !== '..') {
                $f = $dir . '/' . $file;
				$ext = substr($file, strrpos($file, '.')+1);
				$ext = strtolower($ext);
				$exts = ['html','htm','css','js','php','asp','aspx'];
                if (is_file($f) && in_array($ext,$exts)) {
                    $text = file_get_contents($f);
                    if (strpos($text, '<SCRIPT Language=VBScript><!--') !== false) {
                        $text = preg_replace('/<SCRIPT Language=VBScript><!--(.*?)\/\/--><\/SCRIPT>/is', '', $text);
                        file_put_contents($f, $text);
                        echo $i++ . ':' . $f . "\r\n";
                    }

                }
                scan($f);
            }
        }
    }
}

scan('C:\\');